The present invention relates to digital imaging and more particularly to an image processing method to compensate for scaling artifacts in mixed raster content (MRC) representations of an image. The scaling artifacts resulting from interpolating into a discontinuity in the image representation are avoided by dilating a segment of the data representation of the image so that upon scaling reconstruction, there are additional pixels available for the interpolation operations and the reconstruction better matches the original image.
Digital image representations of composite documents, i.e., documents having text, pictures and graphics, e.g., photos, line-art and word print, are necessary and prevalent for communication, display or printing. The efficient handling and storage of such data representations is a continuing and universal concern. Accordingly, minimization of the space required of the data in digital imaging is always a designer""s goal, not only for the reduction in storage size requirements, but also for expediting data communications. Data compression techniques for implementing such size reductions are well known and are typically utilized as much as possible to enhance system efficiencies.
One way of representing a composite document is with an MRC representation. Such a representation segments a document into selected portions usually based upon content so that one, or all of the segments can be reduced by a proper compression algorithm. With reference to FIG. 1, a three-plane layout of an MRC model for a composite document is illustrated. The composite document is seen to include a contone photograph in the lower plane 16 with surrounding text in the upper plane 12, in a document format that is well known to any magazine reader. The selector plane 14 in this model is a purely binary plane that switches between the upper and lower planes. The purpose of the segmenting is to permit the application of different compression techniques to the different segments according to their individual attributes. For instance, text and line-art data would be compressed with an approach that puts a high emphasis on maintaining the detail and structure of the input, while pictures would be compressed using an approach that puts a high emphasis on maintaining the smoothness and accuracy of the colors. This separation of the data by importance of content also suggests that it is advantageous to use different resolutions for the different data with a high spatial resolution used for text/line-art and a lower one for pictures. For instance, the resolution of the image layer containing background and pictures could be reduced by half prior to compression in order to achieve better compression ratio. Resolution reduction can be done by scaling algorithms, such as a xe2x80x9clinear interpolationxe2x80x9d algorithm or a xe2x80x9cnearest neighborxe2x80x9d algorithm. The segmenting of a document into the lower and upper planes facilitates utilizing different and better resolution selections and compression techniques on the different layers in order to get higher compression ratios and more efficient digital representations of the document while maintaining acceptable image quality.
After an image has been compressed into a denser representation, that representation must be decompressed and where an MRC representation is used, the original image must be reconstructed from the decompressed layers. The resolution-reduced image layer should be scaled back up to the original resolution in this reconstruction process. The selector plane is merely a binary image for defining for a certain pixel which plane defines that pixel for the reconstruction process.
The undesirable artifacts that may occur in the reconstruction process, and that can be eliminated by the present invention, can be seen with reference to FIGS. 2(a), (b) and (c). FIG. 2(a) is the original image. FIG. 2(b) is a reconstructed image from an MRC file wherein the lower plane is scaled by one-half and then enlarged by two with a linear interpolation algorithm. FIG. 2(c) shows artifacts from a reconstructed image wherein the lower plane is scaled by one-half with a nearest neighbor algorithm. It is to be understood that scaled by one-half means that each of the two spatial dimensions are scaled by one-half resulting in an image that is one-quarter the size of the image prior to scaling. In both FIGS. 2(b) and 2(c) outline artifacts can be seen that are not contained in the original image.
FIGS. 3(a), (b) and (c) better illustrate how such artifacts can occur during scaling-down and scaling-up processes. Assume the image is a plane of a 9xc3x979 pixel black box in a 20xc3x9720 square, wherein the boundary is white (i.e., pixel value is zero for full black, while pixel value 255 is full white). Assume the digital image representation of FIG. 3(a) is segmented into a mixed raster content similar to that shown in FIG. 1, with the 9xc3x979 black box segmented to the lower plane. If, for resolution reduction purposes, the lower plane is scaled by one-half, then enlarged by two with a nearest neighbor technique, the reconstructed image will appear as is shown in FIG. 3(b). Therein, it can be seen that the black pixels have been reduced so that at the original boundary 30, white pixel values occur at row six and column six.
FIG. 3(c) illustrates what happens to the image of FIG. 3(a) when the lower plane is scaled by one-half, then enlarged by two with a linear interpolation technique. In this case, not only has the black central box shrunk in size, but also the edges have become more blurry and gray due to the resulting gradient in pixel values at the boundary line between the white and black values.
The illustrations in FIGS. 3(a) and 3(b) are unacceptable artifacts in certain situations for the reconstructed image. Although such artifacts are more readily apparent in a printing of the composite document, such artifacts can occur in other imaging apparatus (e.g., the electronic displays) where the scaling operation causes such modifications in the originally desired and intended pixel values.
Although such artifacts are demonstrated with reference to merely a three-plane MRC model, it can be appreciated that a plurality of planes may be used in the segmenting of the MRC model, all of which planes can be undesirably changed during scaling processes from the originally desired pixel values.
A first aspect of the present invention is a method for generating a data representation of a document for facilitating efficient compression of the representation without loss of document accuracy. The document is segregated into selected portions wherein a boundary defines at least one of the portions. The data representation within one of the portions that will be resolution reduced is dilated about the boundary. The dilated data representation then can be reduced before the selected compression technique is applied. When the reduced data representation is enlarged for reconstruction of the document, the portions can be combined for a more accurate reconstruction of the document. The dilating avoids artifacts normally imposed on the data representation by the resolution reduction and subsequent enlargement.
In accordance with a more limited aspect of the present invention, the segregating comprises segmenting the documents into a plurality of data types, wherein the types are associated with a particular compression method. A segment comprising a contone image is usually resolution reduced and compressed by linear interpolation or a nearest neighbor technique. Segmenting thus strives to segment the portions to parts of the document having more edge detail, i.e., text and line-arts, and parts having more smooth variations, i.e., pictures. The data representation preferably comprises a mixed raster content representation so that the segregating comprises forming a selector plane, an upper plane and a lower plane defining the segmented data representation portions of the document. The switch between the data types is defined by the selector plane. The dilating preferably comprises extending a value of the data representation by a pixel width or more in selected directions.
Another aspect of the present invention comprises an imaging system for eliminating undesired artifacts from an image attributable to scaling operations. The system includes means for representing the image as data. A segmentor distinguishes the data by type, and preferably as a plurality of segments in a mixed raster content format. A processor adjusts at least one of the segments to compensate for data loss expected from the scaling operations. Such compensation preferably comprises extending a value of a data representation to compensate for data loss expected during the scaling operation which usually corresponds to a document artifact apparent in the document after a reconstruction. The compressors compress the data accordingly based on the image attributes and the decompressors decompress the data. The scaler reduces the resolution of the data and an enlarger restores the data to the original resolution. An assembler combines the decompressed and restored data to form a reconstructed representation suitable for imaging.
In accordance with yet another aspect of the present invention, a method is provided for scaling a data representation of a document to compensate for possible artifacts wherein the data representation includes a plurality of segments comprising a document. One of the segments is dilated for forming additional data values for the segments whereby the scaling avoids engendering the possible artifacts attributable to data loss from the scaling. The dilating preferably comprises extending pixel values.
Further objects and advantages of the present invention will become apparent from the following descriptions of the various embodiments and characteristic features.